<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    h1 {
      color: red;
      font-size: 60px;
    }
    /* 打印模式下 */
    @media print {
      h1 {
        font-size: 30px;
        color: rgb(230, 17, 17);
      }
    }
  </style>
</head>
<body>
  <h1>标题一</h1>
</body>
</html>